package com.alibaba.citrus.ots.unified.inventory.api;

import com.alibaba.citrus.ots.unified.inventory.dto.api.request.*;
import com.alibaba.citrus.ots.unified.inventory.dto.api.response.*;
import com.alibaba.cz.base.tool.result.Result;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;

/**
 * @description: 调拨单写服务
 * @author: yuhw
 * @date: 2021年08月25日 21:05
 **/
@MeshFlowService(apps = {"bc_ots"})
public interface AllocateOrderWriteService {
    /**
     * 创建调拨单
     * @param allocateOrderCreateRequest
     * @return
     */
    Result<AllocateOrderCreateResponse> create(AllocateOrderCreateRequest allocateOrderCreateRequest);


    /**
     * 同步调拨单 sap->订单平台 调拨单创建
     * @param allocateOrderSyncRequest
     * @return
     */
    Result<AllocateOrderSyncResponse> sync(AllocateOrderSyncRequest allocateOrderSyncRequest);


    /**
     * 销售订单 sap->ots F-B F-b
     * @param request
     * @return
     */
    Result<AllocateOrderSalesOrderSyncResponse> salesOrderSync(AllocateOrderSalesOrderSyncRequest request);


    /**
     * 同公司 - 跨货 转移 009 货权不转移 type 90 B-B
     * @param request
     * @return
     */
    Result<AllocateOrderSubmitSAPResponse> submitSAP(AllocateOrderSubmitSAPRequest request);


    /**
     * F1-B 共享仓到销售单元仓 type 20
     * @param request
     * @return
     */
    Result<AllocateOrderSalesOrderCreateSAPResponse> createSalesOrderSAP(AllocateOrderSalesOrderCreateSAPRequest request);


    /**
     * PC端 手动创建调拨单
     * @param request
     * @return
     */
    Result<AllocateOrderResponse> manualCreate(AllocateOrderManualCreateRequest request);

    /**
     * 保存草稿
     * @param request
     * @return
     */
    Result<AllocateOrderSaveResponse> save(AllocateOrderSaveRequest request);

    /**
     * 调拨单提交
     * @param allocateOrderSubmitRequest
     * @return
     */
    Result<AllocateOrderSubmitResponse> submit(AllocateOrderSubmitRequest allocateOrderSubmitRequest);


    /**
     * 调拨单撤回 至草稿 可编辑
     * @param allocateOrderWithdrawRequest
     * @return
     */
    Result<AllocateOrderWithdrawResponse> withdraw(AllocateOrderWithdrawRequest allocateOrderWithdrawRequest);

    /**
     * 更新调拨单
     * @param allocateOrderUpdateRequest
     * @return
     */
    Result<AllocateOrderUpdateResponse> updateAllocateOrder(AllocateOrderUpdateRequest allocateOrderUpdateRequest);

    /**
     * 调拨单 取消
     * @param allocateOrderCancelRequest
     * @return
     */
    Result<AllocateOrderCancelResponse> cancel(AllocateOrderCancelRequest allocateOrderCancelRequest);

    /**
     * 调拨单 发货
     * @param allocateOrderShippedRequest
     * @return
     */
    Result<AllocateOrderShippedResponse> shipped(AllocateOrderShippedRequest allocateOrderShippedRequest);

    /**
     * 调拨单 收货
     * @param allocateOrderReceivedRequest
     * @return
     */
    Result<AllocateOrderReceivedResponse> received(AllocateOrderReceivedRequest allocateOrderReceivedRequest);

    /**
     * 创建调拨单退单
     * @param allocateOrderBackwardDTO
     * @return
     */
    Result<AllocateOrderResponse> backward(AllocateOrderBackwardDTO allocateOrderBackwardDTO);

    /**
     *  013 销售订单更新 sap->订单共享平台
     * @param request
     * @return
     */
    Result<AllocateOrderSalesOrderUpdateResponse> salesOrderUpdate(AllocateOrderSalesOrderUpdateRequest request);




}
